var express=require('express');
var app=express();

app.use(express.static('public'));
app.get('/demo.html',function(req,res)
{
    console.log(__dirname+"\\"+'demo.html');
    res.sendFile(__dirname+"\\"+'demo.html');
});
app.get('/process_get',function(req,res)
{
    console.log("process_get");
    var response={
      "first_name":req.query.first_name,
      "last_name":req.query.last_name
    };
    console.log(response);
    res.end(JSON.stringify(response));
});

var server=app.listen(8888,function()
{
    var host=server.address().address;
    var port=server.address().port;
    console.log('request for:http://%s:%s',host,port);
});
